package com.itheima.secondkillbuyevent;

public class Commodity {
    private String id;
    private String name;
    private double price;
    private int num;

    public Commodity() {
    }

    public Commodity(String id, String name, double price, int num) {
        this.id = id;
        this.name = name;
        this.price = price;
        this.num = num;
    }

    public Commodity(String id, String name, int num) {
        this.id = id;
        this.name = name;
        this.num = num;
    }

    public Commodity(String name, int num) {
        this.name = name;
        this.num = num;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    @Override
    public String toString() {
        return "Commodity{" +

                ", price=" + price +

        "商品编码：" + id + '\n' +
                "商品名称：'" + name + '\n' +
                ", 价格：" + price +
                "\n, 库存数量：" + num +
                "}\n";

    }
}
